package cn.factorybox.gateway;

import cn.factorybox.common.utils.IdWorker;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;

/**
 * @author flypig
 * @version 1.0
 * @date 2020-03-02 12:35
 */

@SpringBootApplication(exclude= {DataSourceAutoConfiguration.class})
@EnableZuulProxy
@EnableFeignClients
public class FactoryboxGatewayApplication {

    @Bean
    public IdWorker idWorker() {
        // 初始化idworker
        return new IdWorker();
    }
    public static void main(String[] args) {
        SpringApplication.run(FactoryboxGatewayApplication.class);
    }
}
